﻿using System.Windows;
using System.Windows.Threading;
using ImageConverter.Logging;

namespace ImageConverter
{
    /// <summary>
    /// Interaction logic for App.xaml
    /// </summary>
    public partial class App : Application
    {
        private void Application_DispatcherUnhandledException(object sender, DispatcherUnhandledExceptionEventArgs e)
        {
            var log = Logger.GetLog();
            log.Error("Unhandled exception: " + e.Exception.ToString());
            Application.Current.Shutdown();
        }
    }
}
